package com.artpri.model;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * GoodsRecommend entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "goods_recommend", catalog = "jpw")
public class GoodsRecommend implements java.io.Serializable {

	// Fields

	private Integer grcId;
	private Goods goods;
	private Integer shopkeeperNum;
	private String pageNum;
	private String positionNum;
	private Integer grcState;
	private Timestamp createTime;

	// Constructors

	/** default constructor */
	public GoodsRecommend() {
	}

	/** minimal constructor */
	public GoodsRecommend(String pageNum, String positionNum,
			Timestamp createTime) {
		this.pageNum = pageNum;
		this.positionNum = positionNum;
		this.createTime = createTime;
	}

	/** full constructor */
	public GoodsRecommend(Goods goods, Integer shopkeeperNum, String pageNum,
			String positionNum, Integer grcState, Timestamp createTime) {
		this.goods = goods;
		this.shopkeeperNum = shopkeeperNum;
		this.pageNum = pageNum;
		this.positionNum = positionNum;
		this.grcState = grcState;
		this.createTime = createTime;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "grc_id", unique = true, nullable = false)
	public Integer getGrcId() {
		return this.grcId;
	}

	public void setGrcId(Integer grcId) {
		this.grcId = grcId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "goods_num")
	public Goods getGoods() {
		return this.goods;
	}

	public void setGoods(Goods goods) {
		this.goods = goods;
	}

	@Column(name = "shopkeeper_num")
	public Integer getShopkeeperNum() {
		return this.shopkeeperNum;
	}

	public void setShopkeeperNum(Integer shopkeeperNum) {
		this.shopkeeperNum = shopkeeperNum;
	}

	@Column(name = "page_num", nullable = false, length = 8)
	public String getPageNum() {
		return this.pageNum;
	}

	public void setPageNum(String pageNum) {
		this.pageNum = pageNum;
	}

	@Column(name = "position_num", nullable = false, length = 8)
	public String getPositionNum() {
		return this.positionNum;
	}

	public void setPositionNum(String positionNum) {
		this.positionNum = positionNum;
	}

	@Column(name = "grc_state")
	public Integer getGrcState() {
		return this.grcState;
	}

	public void setGrcState(Integer grcState) {
		this.grcState = grcState;
	}

	@Column(name = "create_time", nullable = false, length = 19)
	public Timestamp getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Timestamp createTime) {
		this.createTime = createTime;
	}

}